<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			var imgs = ["img/baidu_web.png", "img/google_web-444.png", "img/taobao_shopping-446.png"];
			var addresses = ["https://www.baidu.com", "https://www.google.com", "https://www.taobao.com"];

			function repl(img) {
				var pic = document.getElementById("pic");
                  pic.src = imgs[img.id];
                var ff = document.getElementById("f");
                    ff.action = addresses[img.id];
}
		</script>
		<style type="text/css">
			#main {
				margin: 0 auto;
				width: 500px;
				border: 1px solid red;
			}
		</style>
	</head>

	<body>
		<div id="main">
			<form action="https://www.baidu.com" method="post" id="f">
				<p>
					<img src="img/baidu_web.png" id="pic" "/>
					<input type="search" name="">
					<input type="submit" value="搜索" /></p>
				<p style="margin-left: 100px;">
					<input type="radio" name="xinxi" onclick="repl(this)" id="0" checked/>百度
					<input type="radio" name="xinxi" onclick="repl(this)" id="1" />谷歌
					<input type="radio" name="xinxi" onclick="repl(this)" id="2" />淘宝
				</p>
			</form>
		</div>
	</body>

</html>